package com.yf.dxapp.module.dxapp.controller.admin.course.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 课程信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CourseRespVO {

    @Schema(description = "课程id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13307")
    @ExcelProperty("课程id")
    private Long id;

    @Schema(description = "课程名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("课程名称")
    private String title;

    @Schema(description = "课程总时长")
    @ExcelProperty("课程总时长")
    private Long totalTimes;

    @Schema(description = "课程节数", example = "4445")
    @ExcelProperty("课程节数")
    private Long courseShotCount;

    @Schema(description = "课程分类", example = "1")
    @ExcelProperty("课程分类")
    private Long courseType;

    @Schema(description = "课程描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    @ExcelProperty("课程描述")
    private String description;

    @Schema(description = "查看级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "26954")
    @ExcelProperty(value = "查看级别", converter = DictConvert.class)
    @DictFormat("app_user_level") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Long levelId;

    @Schema(description = "排序")
    @ExcelProperty("排序")
    private Integer sort;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "老师id", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("老师id")
    private Long publisherId;

    @Schema(description = "是否热门")
    @ExcelProperty(value = "是否热门", converter = DictConvert.class)
    @DictFormat("app_yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer hot;

    @Schema(description = "课程封面")
    @ExcelProperty("课程封面")
    private String cover;

    @Schema(description = "是否上架")
    @ExcelProperty(value = "是否上架", converter = DictConvert.class)
    @DictFormat("app_yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer shelf;

    @Schema(description = "是否精选")
    @ExcelProperty(value = "是否精选", converter = DictConvert.class)
    @DictFormat("app_yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer selected;

    @Schema(description = "是否推荐")
    @ExcelProperty(value = "是否推荐", converter = DictConvert.class)
    @DictFormat("app_yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer recommend;

    @Schema(description = "老师名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("老师名")
    private String publisherName;

}